using WpfApp1.DataAccess;
using WpfApp1.Models;

namespace WpfApp1.Services;

public class CourseSelectService : ICourseSelectService
{
    private readonly ICourseSelectDataAccess _courseSelectDataAccess;

    public CourseSelectService(ICourseSelectDataAccess courseSelectDataAccess)
    {
        _courseSelectDataAccess = courseSelectDataAccess;
    }

    //选择课程
    public void SelectCourses(string courseNumber, string studentNumber)
    {
        _courseSelectDataAccess.SelectCourses(courseNumber, studentNumber);
    }

    /**
     * 查询所有学生选课信息
     */
    public List<StudentCourseSelection> GetStudentCourses()
    {
        return _courseSelectDataAccess.GetStudentCourses();
    }

    /**
     * 根据学生Number查询选课信息
     */
    public List<StudentCourseSelection> GetStudentCoursesByStudentNumber(CourseSelection courseSelection)
    {
        return _courseSelectDataAccess.GetStudentCoursesByStudentNumber(courseSelection);
    }

    /**
     * 根据课程Number查询选课信息
     */
    public List<StudentCourseSelection> GetStudentCoursesByCourseNumber(CourseSelection courseSelection)
    {
        return _courseSelectDataAccess.GetStudentCoursesByCourseNumber(courseSelection);
    }

    /**
     * 管理员据课程Number查询选课信息
     */
    public List<StudentCourseSelection> AdminGetStudentSelectCoursesByNumber(CourseSelection courseSelection)
    {
        return _courseSelectDataAccess.AdminGetStudentSelectCoursesByNumber(courseSelection);
    }
}